<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<script>
var username=document.getElementById(elementId);
function sx() {
	document.getElementById("code").src="<%=request.getContextPath()%>/CheckCodeServlet?date="+new Date().getTime();
}
</script>
<style>
body
{
background:wide;
}
form
{
padding:50px;
width:200px;
text-align:top;
border:2px solid red;
color:black;
position:absolute;
top:50%;
left:50%;
margin-left:-172px;
margin-top:-170px;
}
p
{
font-weight:bold;
margin:10px;
}
#login
{
font-weight:bold;
color:green;
background:skyblue;
}
</style>
<body>
<form action="LoginServlet">
<p>用户：<input type="text" id="username" name="username" /></p>
<p>密码：<input type="password" id="password" name="password"/></p>
<p>验证码：<input type="text" name="checkcode" size=8 /></p>
<p><img src="CheckCodeServlet" alt="验证码" onclick="javascript:sx();" id="code" /></p>
<p><input type="submit" value="登录" id="login" /></p>
</form>
</body>
</html>